<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCompanyCertificationTable extends Migration {
    /**
     * 企业认证表
     * @return void
     */
    public function up () {
        Schema::create('company_certification', function (Blueprint $table) {
            $table->engine = 'MyISAM';
            $table->comment = '企业认证表';
            $table->increments('id')->unsigned()->comment('自动增长主键');
            $table->integer('uid')->unique('uid')->default(0)->comment('所属用户uid');
            $table->integer('com_id')->unsigned()->index('com_id')->default(0)->comment('所属企业id');
            $table->string('company_name', 100)->default('')->comment('公司名称');
            $table->string('license', 200)->default('')->comment('营业执照图片');
            $table->tinyInteger('status')->unsigned()->default(0)->comment('审核状态(0未审核1审核通过2代表审核不通过)');
            $table->text('remark')->default('')->comment('审核不通过的原因');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down () {
        Schema::drop('company_certification');
    }
}
